/**
 * 
 */
package com.module.bp.event.numbered;

import com.dalonedrau.jogl.engine.GlobalConsts;
import com.dalonedrau.jogl.opengl.TextLoader;
import com.dalonedrau.jogl.opengl.animation.AnimConsts;
import com.module.bp.condition.LinkedCondition;
import com.module.bp.condition.LocationCondition;
import com.module.bp.condition.RollCondition;
import com.module.bp.engine.BPRand;
import com.module.bp.engine.Turn;
import com.module.bp.event.base.AnimationEvent;
import com.module.bp.event.base.BaseEvent;
import com.module.bp.event.base.CenterMapOnPartyEvent;
import com.module.bp.event.base.SmallMessageEvent;
import com.module.bp.event.base.TeleportPartyEvent;
import com.module.bp.player.BPParty;

/**
 * @author Donald
 *
 */
public final class EventE002 extends BaseEvent {
	public EventE002() {
		LocationCondition loc0 = new LocationCondition();
		for (int i = 0; i < 20; i++) {
			if (i == 13) {
				continue;
			}
			loc0.addLocation(i);
		}
		loc0.addLocation(22);
		loc0.addLocation(24);
		RollCondition roll = new RollCondition();
		roll.setThreshold(4);
		roll.setCdtnModifier(1);
		LocationCondition loc1 = new LocationCondition();
		loc1.addLocation(0);
		loc1.addLocation(14);
		roll.setCondition(loc1);
		LinkedCondition linked = new LinkedCondition();
		linked.addCondition(loc0);
		linked.addCondition(roll);
		super.setCondition(linked);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setUserInput(final int input) {
		// TODO Auto-generated method stub
		
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void fire() throws Exception {
		if (super.happens()) {
			super.setFired(true);
			super.setResolved(true);
			Turn.getInstance().addEventAfterId(super.getId(), 
					new SmallMessageEvent("Encounter", "Mercenary Guardsmen"));
		} else {
			super.setFired(true);
			super.setResolved(true);			
		}
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setUserInput(final boolean input) { }
}
